package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the GRUPO_LIBRO_PARTICIPANTE database table.
 * 
 */
@Embeddable
public class GrupoLibroParticipantePK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private String tipLibro;
	private String tipParticipante;
	private String codPartic;

    public GrupoLibroParticipantePK() {
    }

	@Column(name="TIP_LIBRO", unique=true, nullable=false, length=3)
	public String getTipLibro() {
		return this.tipLibro;
	}
	public void setTipLibro(String tipLibro) {
		this.tipLibro = tipLibro;
	}

	@Column(name="TIP_PARTICIPANTE", unique=true, nullable=false, length=3)
	public String getTipParticipante() {
		return this.tipParticipante;
	}
	public void setTipParticipante(String tipParticipante) {
		this.tipParticipante = tipParticipante;
	}

	@Column(name="COD_PARTIC", unique=true, nullable=false, length=3)
	public String getCodPartic() {
		return this.codPartic;
	}
	public void setCodPartic(String codPartic) {
		this.codPartic = codPartic;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof GrupoLibroParticipantePK)) {
			return false;
		}
		GrupoLibroParticipantePK castOther = (GrupoLibroParticipantePK)other;
		return 
			this.tipLibro.equals(castOther.tipLibro)
			&& this.tipParticipante.equals(castOther.tipParticipante)
			&& this.codPartic.equals(castOther.codPartic);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.tipLibro.hashCode();
		hash = hash * prime + this.tipParticipante.hashCode();
		hash = hash * prime + this.codPartic.hashCode();
		
		return hash;
    }
}